package com.iampzh.oa.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.iampzh.oa.dao.PersonDao;
import com.iampzh.oa.entitys.Person;

@Controller
public class PersonController {
	@Autowired
	private PersonDao PersonDao;
	@RequestMapping("/")
public String index(){
		Person person=new Person();
		
		person.setName("iampzh");
		person.setAddress("dddddddd");
		PersonDao.save(person);
		
	return "index";
	
}
}
